package com.sop.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sop.dao.OrganizationalDao;
import com.sop.model.OrganizationalInfo;
import com.sop.model.vo.OrganizationalInfoVo;
import com.sop.service.OrganizationalService;

import common.base.service.BaseServiceImpl;

@Service("organizationalService")
@Transactional
public class OrganizationalServiceImpl extends BaseServiceImpl<OrganizationalInfo,OrganizationalInfoVo>  implements OrganizationalService{

	@Autowired
	private  OrganizationalDao organizationalDao;
	
	@Resource(name="organizationalDao")
	public void setBaseDao(OrganizationalDao  organizationalDao){
		super.setBaseDao(organizationalDao);
	}
	
	@Override
	public Boolean deleteBatch(List<Integer> ids) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public OrganizationalInfo add(OrganizationalInfo entity) {
		organizationalDao.save(entity);
		return get(entity.getId());
	}

	@Override
	public OrganizationalInfo update(OrganizationalInfo entity) {
		organizationalDao.update(entity);
		return get(entity.getId());
	}

}
